﻿
namespace HSS.Interlink.Web
{
	/// <summary>
	/// Defines the contract for a File Transmit Service.
	/// </summary>
	public interface IFileTransmit
	{
		/// <summary>
		/// Gets or sets if client side caching is enabled.
		/// </summary>
		bool EnableClientCache { get; set; }

		/// <summary>
		/// Gets or sets the client side cache expiration.
		/// </summary>
		System.TimeSpan ClientCacheExpiration { get; set; }

		/// <summary>
		/// Gets or sets the File Cacheability.
		/// </summary>
		System.Web.HttpCacheability ClientCacheability { get; set; }

		/// <summary>
		/// Writes the specified file directly to the current HTTP response output stream, without buffering it in memory.
		/// </summary>
		/// <param name="filePath">The absolute path to the file to transmit.</param>
		/// <param name="fileName">The name of the file that is being transmitted.</param>
		/// <param name="fileLength">The length of the file being sent.</param>
		/// <param name="attachment">true to send with Attachment Disposition; otherwise false for Inline Disposition.</param>
		/// <param name="contentTypeOverride">Optional parameter to specify the Content-Type for the response; otherwise an empty string to allow automatic Content-Type resolution based on file extension.</param>
		void TransmitLocalFile(string filePath, string fileName, long fileLength, bool attachment, string contentTypeOverride);
	}
}
